<template>
  <div class="reportFormPage">
    <div class="report-dom">
      <el-row>
        <el-col :span="5" :offset="19">
          <div class="pageNumBox">
            <span>第</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.page }}&nbsp;</span>
            <span>页，共</span>
            <span class="placeholder-min text-center">&nbsp;{{ form.totalPage }}&nbsp;</span>
            <span>页</span>
          </div>
        </el-col>
      </el-row>
      <div class="topTwoBox">
        <div class="centerName">砂浆配合比设计试验检测报告</div>
        <div class="codeText">
          <tr>BGLQ05002F</tr>
        </div>
      </div>
      <div class="threeTopBox">
        <div class="left-border">
          <div class="box-title">检测单位名称：</div>
          <div class>{{ form.jiancdwmc }}</div>
        </div>
        <div class="right-border">
          <span>报告编号：</span>
          <span class="placeholder">{{ form.baogbh }}</span>
        </div>
      </div>
      <!-- .........................1111111111111111111111111111111......................................................... -->
      <div class="table-border">
        <table height="220px" class="top-table">
          <tbody>
            <tr>
              <td height="25" align="center" width="15%">
                <span style="width:90px;display:inline-block">施工/委托单位</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.shigwtdw }}</span>
              </td>
              <td align="center" width="15%">
                <span style="width:90px;display:inline-block">工程名称</span>
              </td>
              <td width="35%" class="text-center">
                <span>{{ form.gongcmc }}</span>
              </td>
            </tr>
            <tr>
              <td height="25" align="center">工程部位/用途</td>
              <td class="text-center" colspan="3">
                <span>{{ form.gongcbwyt }}</span>
              </td>
            </tr>
            <tr>
              <td height="50" align="center">样品信息</td>
              <td class="specimen-border" colspan="3">
                <span>样品名称：</span>
                <span :class="{ 'placeholder':!form.yangpmc }">{{ form.yangpmc }}</span>
                <span>；样品编号：</span>
                <span :class="{ 'placeholder-long':!form.yangpbh }">{{ form.yangpbh }}</span>
                <span>；样品数量：</span>
                <span :class="{ 'placeholder':!form.yangpsl }">{{ form.yangpsl }}</span>
                <span>；样品状态：</span>
                <span :class="{ 'placeholder':!form.yangpzt }">{{ form.yangpzt }}</span>
              </td>
            </tr>
            <tr>
              <td height="50" align="center" width="15%">
                <span style="width: 90px; display: inline-block">检测依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.jiancyj }}</span>
                <el-input v-else type="textarea" v-model="form.jiancyj" :rows="2" class="mark" @dblclick.native="showBsJiancyjView" readonly />
              </td>
              <td align="center" width="15%">
                <span style="width: 90px; display: inline-block">判定依据</span>
              </td>
              <td width="35%">
                <span v-if="isPdf">{{ form.pandyj }}</span>
                <el-input v-else type="textarea" v-model="form.pandyj" :rows="2" @dblclick.native="showBsJudgeBaseView" @focus="handleFocus('pandyj')" class="mark" />
              </td>
            </tr>
            <tr class="bottom-border">
              <td height="50" align="center">
                <div>主要仪器设备</div>
                <div>名称及编号</div>
              </td>
              <td colspan="3">
                <span v-if="isPdf">{{form.zhuyyqsbmcjbh}}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.zhuyyqsbmcjbh" class="height100 width100 mark" @dblclick.native="showBsInstrumentView" readonly></el-input>
              </td>
            </tr>
          </tbody>
        </table>
        <!-- .................................22222222222222222222222222222222............................................... -->
        <table height="550px" class="middle-table">
          <tbody>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="2" width="10%">设计条件</td>
              <td colspan="1" width="10%">
                设计强度
                <br />等级
              </td>
              <td colspan="2" width="20%">{{form.shejqddj}}</td>
              <td colspan="2" width="20%">稠度(mm)</td>
              <td colspan="1" width="10%">{{form.shejcd}}</td>
              <td colspan="2" width="20%">养护方法</td>
              <td colspan="1" width="10%">{{form.yanghfs}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" width="10%">拌制方法</td>
              <td colspan="2" width="20%">{{form.banzff}}</td>
              <td colspan="2" width="20%">标准差σ</td>
              <td colspan="1" width="10%">{{form.biaozc}}</td>
              <td colspan="2" width="20%">养护环境</td>
              <td colspan="1" width="10%">{{form.yanghhj}}</td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="2" width="10%">水泥</td>
              <td colspan="1" width="10%">品牌及强度等级</td>
              <td colspan="8" width="20%">{{form.shuinppjqddj}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" width="10%">产地</td>
              <td colspan="2" width="20%">{{form.shuincd}}</td>
              <td colspan="3" width="20%">28d抗压强度(MPa)</td>
              <td colspan="3" width="10%">
                <el-input v-model="form.shuinkyqd" @keydown.native="handleKeyDown($event, 0, 0)" :ref="'0_0'"/>
              </td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="2" width="10%">细集料</td>
              <td colspan="1" width="10%">名称</td>
              <td colspan="2" width="20%">
                <el-input v-model="form.xijlmc" @keydown.native="handleKeyDown($event, 1, 0)" :ref="'1_0'"/>
              </td>
              <td colspan="2" width="20%">类型</td>
              <td colspan="1" width="10%">{{form.xijllx}}</td>
              <td colspan="2" width="20%">细度模数</td>
              <td colspan="1" width="10%">{{form.xidms}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" width="10%">产地</td>
              <td colspan="2" width="20%">{{form.xijlcd}}</td>
              <td colspan="2" width="20%">表观密度(kg/m³)</td>
              <td colspan="1" width="10%">{{form.xijlbgmd}}</td>
              <td colspan="2" width="20%">堆积密度(kg/m³)</td>
              <td colspan="1" width="10%">
                <el-input v-model="form.xijdjmd" @keydown.native="handleKeyDown($event, 2, 0)" :ref="'2_0'"/>
              </td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" width="10%">水</td>
              <td colspan="1" width="10%">水源状况</td>
              <td colspan="2" width="20%">
                <el-input v-model="form.shuiyzk" @keydown.native="handleKeyDown($event, 3, 0)" :ref="'3_0'"/>
              </td>
              <td colspan="2" width="20%">水源地</td>
              <td colspan="1" width="10%">
                <el-input v-model="form.shuiyd" @keydown.native="handleKeyDown($event, 3, 1)" :ref="'3_1'"/>
              </td>
              <td colspan="2" width="20%">水质分类</td>
              <td colspan="1" width="10%">
                <el-input v-model="form.shuizfl" @keydown.native="handleKeyDown($event, 3, 2)" :ref="'3_2'"/>
              </td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="4" width="10%">试验室配合比</td>
              <td colspan="6" width="20%">{{form.shuinssb}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="7" width="10%">计算配合比kg/m³</td>
              <td colspan="3" width="10%">水泥</td>
              <td colspan="6" width="20%">{{form.shuin}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="2" width="10%">掺加料</td>
              <td colspan="2" width="10%">{{form.chanjlmc1}}</td>
              <td colspan="6" width="20%">{{form.chanjlmc2}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="10%">{{form.chanjlyl1}}</td>
              <td colspan="6" width="20%">{{form.chanjlyl2}}</td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="3" width="10%">水</td>
              <td colspan="6" width="20%">{{form.shui}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="3" width="10%">砂</td>
              <td colspan="6" width="20%">{{form.sha}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="1" rowspan="2" width="10%">外加剂</td>
              <td colspan="2" width="10%">{{form.waicjmc1}}</td>
              <td colspan="6" width="20%">{{form.waijjyl1}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="10%">{{form.waicjmc2}}</td>
              <td colspan="6" width="20%">{{form.waijjyl2}}</td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="4" width="10%">制件日期</td>
              <td colspan="6" width="20%">{{form.chengxrq}}</td>
            </tr>

            <!--            list-->
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" rowspan="4" width="10%">
                3
                <br />天
                <br />强
                <br />度
              </td>
              <td colspan="2" width="20%">试验日期</td>
              <td colspan="6" width="20%">{{form.ssyrq}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">荷载(kN)</td>
              <td colspan="2" width="20%">{{form.shz1}}</td>
              <td colspan="2" width="20%">{{form.shz2}}</td>
              <td colspan="2" width="20%">{{form.shz3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">强度(MPa)</td>
              <td colspan="2" width="20%">{{form.sqd1}}</td>
              <td colspan="2" width="20%">{{form.sqd2}}</td>
              <td colspan="2" width="20%">{{form.sqd3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">结果(MPa)</td>
              <td colspan="6" width="60%">{{form.spjqd}}</td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="2" rowspan="4" width="10%">
                7
                <br />天
                <br />强
                <br />度
              </td>
              <td colspan="2" width="20%">试验日期</td>
              <td colspan="6" width="20%">{{form.qsyrq}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">荷载(kN)</td>
              <td colspan="2" width="20%">{{form.qhz1}}</td>
              <td colspan="2" width="20%">{{form.qhz2}}</td>
              <td colspan="2" width="20%">{{form.qhz3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">强度(MPa)</td>
              <td colspan="2" width="20%">{{form.qqd1}}</td>
              <td colspan="2" width="20%">{{form.qqd2}}</td>
              <td colspan="2" width="20%">{{form.qqd3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">结果(MPa)</td>
              <td colspan="6" width="60%">{{form.qpjqd}}</td>
            </tr>

            <tr trindex="1" width="100%" height="20">
              <td colspan="2" rowspan="4" width="10%">
                28
                <br />天
                <br />强
                <br />度
              </td>
              <td colspan="2" width="20%">试验日期</td>
              <td colspan="6" width="20%">{{form.esyrq}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">荷载(kN)</td>
              <td colspan="2" width="20%">{{form.ehz1}}</td>
              <td colspan="2" width="20%">{{form.ehz2}}</td>
              <td colspan="2" width="20%">{{form.ehz3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">强度(MPa)</td>
              <td colspan="2" width="20%">{{form.eqd1}}</td>
              <td colspan="2" width="20%">{{form.eqd2}}</td>
              <td colspan="2" width="20%">{{form.eqd3}}</td>
            </tr>
            <tr trindex="1" width="100%" height="20">
              <td colspan="2" width="20%">结果(MPa)</td>
              <td colspan="6" width="60%">{{form.epjqd}}</td>
            </tr>
          </tbody>
        </table>
        <!-- .....................................................33333333333333333................................................... -->
        <table height="100px" class="bottom-table">
          <tbody>
            <tr>
              <td style="border-bottom-width: 1px;">
                <span v-if="isPdf" class="textarea-span">{{ form.jiancjl }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.jiancjl" @focus="handleFocus('jiancjl')" @dblclick.native="getJcjl()" />
              </td>
            </tr>
            <tr>
              <td>
                <span v-if="isPdf" class="textarea-span">{{ form.fujsm }}</span>
                <el-input v-else type="textarea" :rows="2" v-model="form.fujsm" @focus="handleFocus('fujsm')" />
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <!-- .................................44444444444............................................. -->
      <table height="22px" class="transparent">
        <tbody>
          <tr>
            <td width="10%" align="right">检测：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">审核：</td>
            <td width="15%" align="left"></td>
            <td width="10%" align="right">批准：</td>
            <td align="left" width="15%"></td>
            <td width="10%">日期：</td>
            <td align="left" width="15%">
              <div style="display: inline-block; margin-left: 20px">年</div>
              <div style="display: inline-block; margin-left: 20px">月</div>
              <div style="display: inline-block ;margin-left: 20px">日</div>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
    <bs-jiancyj-view ref="bsJiancyjViewRef" @select="selectJiancyj" :syType="syType"></bs-jiancyj-view>
    <bs-instrument-view ref="bsInstrumentViewRef" @select="selectInstrument"></bs-instrument-view>
    <bs-judge-base-view ref="bsJudgeBaseViewRef" @select="selectJudge" :syType="syType" />
    <bs-judge-base-edit-view ref="bsJudgeBaseEditViewRef" @submit="selectJudgeBaseEdit" :syType="syType" />
  </div>
</template>

<script>
import { getSjPhbsjsyjcbgBsInfo } from "@/api/reportsj/sjPhbsjsyjcbgBsInfo";
import BsInstrumentView from "@/views/dept/bsInstrument/BsInstrumentView.vue";
import BsJiancyjView from "@/views/sycs/bsJiancyj/BsJiancyjView.vue";
import Bus from "@/utils/bus";
import { emptyConvert, handleFocus ,uniqueStr,handleKeyDown} from "@/views/reportForms/utils";

import BsJudgeBaseView from "@/views/sycs/bsJudgeBase/BsJudgeBaseView";
import BsJudgeBaseEditView from "@/views/sycs/bsJudgeBase/BsJudgeBaseEditView";
import { computeBiQualification } from "@/api/sycs/biQualification";
import decimal from "@/utils/big-decimal";

export default {
  name: "bhw",
  components: {
    BsInstrumentView,
    BsJiancyjView,
    BsJudgeBaseView,
    BsJudgeBaseEditView
  },
  data() {
    return {
      list1: [
        { index: 1, cailmc: "水泥", xinghgg: "P.042.5", shengccjcd: "新泰中联泰丰水泥有限公司", danwyl: "280", zhilb: "1" },
        { index: 2, cailmc: "河砂", xinghgg: "中砂", shengccjcd: "山东省淄博沂源县天湖采砂厂", danwyl: "1700", zhilb: "6.0714" },
        { index: 3, cailmc: "水", xinghgg: "饮用水", shengccjcd: "-", danwyl: "240", zhilb: "0.8571" },
        { index: 4, cailmc: "", xinghgg: "", shengccjcd: "", danwyl: "", zhilb: "" },
        { index: 5, cailmc: "", xinghgg: "", shengccjcd: "", danwyl: "", zhilb: "" }
      ],
      list2: [
        { xuh: 1, jiancxm: "表观密度(kg/m3)", jiszb: "≥1900", jiancjg: "2180", jiegpd: "符合要求" },
        { xuh: 2, jiancxm: "稠度(mm)", jiszb: "70-90", jiancjg: "83", jiegpd: "符合要求" },
        { xuh: 3, jiancxm: "保水率(%)", jiszb: "≥80", jiancjg: "88.0", jiegpd: "符合要求" },
        { xuh: 4, jiancxm: "分层度(mm)", jiszb: "/", jiancjg: "15", jiegpd: "实测值" },
        { xuh: "", jiancxm: "", jiszb: "", jiancjg: "", jiegpd: "" },
        { xuh: "", jiancxm: "", jiszb: "", jiancjg: "", jiegpd: "" },
        { xuh: "", jiancxm: "", jiszb: "", jiancjg: "", jiegpd: "" }
      ],
      jilbh: "",
      form: {
        shuinssb: "",
        shejqddj: "",
        yanghhj: "",
        gongcbwyt: "",
        baogbh: "",
        shigwtdw: "济南绕城高速东线小许家枢纽至遥墙机场段改扩建工程房建工程综合楼",
        jiancdwmc: "山东路桥集团试验检测中心有限公司泰安高速公路施工总承包项目工地试验室",
        totalPage: "",
        page: "",
        zhuyyqsbmcjbh: "",
        jiancyj: "",
        gongcmc: "汾阳至石楼高速公路",
        yangpmc: "K39+820-K40+440原地面",
        yangpbh: "JTG/T 3610-2019",
        laiysj: "2022年03月09日",
        yangpsl: "3kg",
        yangpzt: "完好无损"
      },
      twoTableData: {},
      threeTableData: {},
      jiancjl: "检测结论：经检测，该水泥砂浆拌和物的分层度实值为15mm，其他所检参数符合JGJ/T98-2010的技术要求。",
      fjsm: "附加声明：",
      dateText: "2024年05月10日",
      readonly: false
    };
  },
  props: {
    excelId: {
      type: [String, Number],
      default: () => ""
    },
    isPdf: {
      type: Boolean,
      default: () => false
    },
    syType: {
      type: [String, Number],
      default: () => ""
    }
  },
  watch: {},
  created() {
    this.getInfo();
  },
  mounted() {
    //接收form表单值。
    Bus.$on("setphbbgform", (data) => {
      const arr = [
        "shuinssb",
        "xijlcd",
        "sha",
        "shejqddj",
        "banzff",
        "shuinppjqddj",
        "shuincd",
        "chanjlmc1",
        "chanjlyl1",
        "chanjlyl2",
        "xijlbgmd",
        "xidms",
        "xijllx",
        "chanjlmc2",
        "waicjmc1",
        "waijjyl1",
        "waicjmc2",
        "waijjyl2",
        "shui",
        "chengxrq",
        "ssyrq",
        "shz1",
        "shz2",
        "shz3",
        "sqd1",
        "yanghfs",
        "sqd2",
        "sqd3",
        "qhz1",
        "qhz2",
        "qhz3",
        "qqd1",
        "shejcd",
        "qqd2",
        "qqd3",
        "ehz1",
        "ehz2",
        "ehz3",
        "eqd1",
        "biaozc",
        "eqd2",
        "eqd3",
        "epjqd",
        "yanghhj",
        "esyrq",
        "shuin",
        "spjqd",
        "qsyrq",
        "qpjqd"
      ];
      arr.forEach((item) => {
        this.form[item] = data[item];
      });
      this.$forceUpdate();
    });
    // // 列表
    // Bus.$on("setphbbglist", (data) => {
    //   this.list = data;
    // });
    // 检测依据
    Bus.$on("setSjBgJiancyj", (data) => {
      const { jiancyj, jiancyjIds } = data;
      const str = jiancyj + (this.form.jiancyj ? "、" + this.form.jiancyj : "");
      const ids = jiancyjIds + (this.form.jiancyjIds ? "," + this.form.jiancyjIds : "");
      this.form.jiancyj = uniqueStr(str, "、");
      this.form.jiancyjIds = uniqueStr(ids, ",");
    });
    // 主要设备
    Bus.$on("setSjBgZhuyyqsbmcjbh", (data) => {
      const { zhuyyqsbmcjbh, shebIds } = data;
      const str = zhuyyqsbmcjbh + (this.form.zhuyyqsbmcjbh ? "、" + this.form.zhuyyqsbmcjbh : "");
      const ids = shebIds + (this.form.shebIds ? "," + this.form.shebIds : "");
      this.form.zhuyyqsbmcjbh = uniqueStr(str, "、");
      this.form.shebIds = uniqueStr(ids, ",");
    });
    // 报表给报告传值
    Bus.$on("setShajphebBgData", (data) => {
      // this.form = data;
    });
  },
  beforeDestroy() {
    // 或者你可以使用其他合适的生命周期钩子
    // 停止监听事件
    Bus.$off("setphbbgform");
    Bus.$off("setphbbglist");
    Bus.$off("setSjBgJiancyj");
    Bus.$off("setSjBgZhuyyqsbmcjbh");
  },
  methods: {
    getInfo() {
      if (!this.excelId) {
        return;
      }
      getSjPhbsjsyjcbgBsInfo(this.excelId).then((response) => {
        this.form = response.data;
        if (!this.form.jiancjl) {
          this.form.jiancjl = "检测结论：";
        }
        if (!this.form.fujsm) {
          this.form.fujsm = "附加声明：";
        }
        // this.form.baDetailVos = {
        //   154: { excelId: "1806593001807482880", id: 28, jiancjg: "36.89", jiegpd: "符合", jiszb: ">20", num1: "10", num2: null, qualId: 154, symbolValue: "02" }
        // };
      });
    },
    submitForm() {
      return this.form;
    },
    // 显示判定依据列表
    showBsJudgeBaseView() {
      this.$refs.bsJudgeBaseViewRef.init(this.form.pandyjIds);
    },
    // 判断依据选择
    selectJudge(info) {
      if (!info || !info.label) {
        return;
      }
      if (!this.form.pandyj) {
        this.form.pandyj = info.label;
      } else {
        if (info && info.label) {
          this.form.pandyj += "、" + info.label;
        }
      }
      // 添加指标 info.list
      let keys = [];
      info.list.forEach((item) => {
       if (this.form.baDetailVos[item.refQualId] && this.form.baDetailVos[item.refQualId].jiancjg) {
          this.form.baDetailVos[item.refQualId].symbolValue = item.symbolValue;
          this.form.baDetailVos[item.refQualId].num1 = item.num1;
          this.form.baDetailVos[item.refQualId].num2 = item.num2;
          keys.push(item.refQualId);
        }
      });
      this.computeDetectionResult(keys);
    },
    // 计算检测结果
    computeDetectionResult(keys) {
      if (!keys || keys.length <= 0) {
        return;
      }
      const data = keys.map((key) => {
        const info = {
          ...this.form.baDetailVos[key],
          jiancjg: this.form.baDetailVos[key].jiancjg == "-" ? "" : this.form.baDetailVos[key].jiancjg
        };
        return info;
      });
      computeBiQualification(data).then((res) => {
        const returnData = res.data;
        returnData.forEach((item) => {
          if (!item.symbolValue && !item.num1 && !item.num2) {
            item.jiszb = "-";
          }
          item.jiancjg = item.jiancjg ? item.jiancjg : "-";
          this.form.baDetailVos[item.qualId] = item;
        });
      });
    },
    // 获取检测结论
    getJcjl() {

      //截取水灰比；
      let shuihb = '';
      if(this.form.shuinssb){
        var strings = this.form.shuinssb.split(':');
        if(strings.length=3){
          shuihb = strings[2]
        }
      }
      //计算强度占比；
      let zhanb = '';
      if(this.form.shejqddj && this.form.epjqd){
        zhanb = decimal.divide(decimal.multiply(parseFloat(this.form.epjqd),100),parseFloat(this.form.shejqddj.substring(1)),1)
      }
      //       检测结论：经检验，选择水灰比0.931作为试验室配合比，该配合比(28d)实测强度为16.8MPa，达到试配强度的140.0%，
//       符合JGJ/T98-2010《砌筑砂浆配合比设计规程》及设计文件中技术要求。
      this.form.jiancjl = '检测结论：经检验，选择水灰比'+shuihb+'作为试验室配合比，该配合比(28d)实测强度为'+this.form.epjqd+'MPa，达到试配强度的'
      +zhanb+'%，符合JGJ/T98-2010《砌筑砂浆配合比设计规程》及设计文件中技术要求。';
      // const form = JSON.parse(JSON.stringify(this.form));
      // queryJcjl(emptyConvert(form)).then((res) => {
      //   const info = res.data;
      //   this.form.jiancjl = info.jiancjl;
      // });
    },
    // 编辑单个技术指标后赋值
    selectJudgeBaseEdit(info) {
      if (info.qualId) {
        this.form.baDetailVos[info.qualId] = info;
      }
      this.computeDetectionResult([info.qualId]);
    },

    // 显示检测依据列表
    showBsJiancyjView() {
      this.$refs.bsJiancyjViewRef.init(this.form.jiancyjIds);
    },
    // 检测依据选择
    selectJiancyj(info) {
      // this.$set(this.form, 'jiancyj', info.label);
      this.form.jiancyj = info.label;
      this.form.jiancyjIds = info.ids;
    },
    // 仪器选择
    selectInstrument(info) {
      this.form.zhuyyqsbmcjbh = info.label;
      this.form.shebIds = info.ids;
    },
    // 显示仪器列表
    showBsInstrumentView() {
      this.$refs.bsInstrumentViewRef.init(this.form.shebIds);
    },
    handleFocus(event) {
      handleFocus(event, this.page, this.form[event]);
    }
    ,
    handleKeyDown(event, rowIndex, colIndex) {
      const maxArr = [0, 0, 0, 2];
      const ref = handleKeyDown(event, rowIndex, colIndex, maxArr);
      if (this.$refs[ref]) {
        this.$refs[ref].focus();
      }
    }
  }
};
</script>

<style scoped lang="scss">
</style>
